extends VBoxContainer

var col = ColorN("yellow")

var messages = []

var max_messages = 10

func add_message(text):

	if len(messages) >= max_messages:
		var to_be_deleted = messages[0]
		messages.pop_front()
		to_be_deleted.cleanup()

	var m = ChatMessage.new(text,col)
	messages.append(m)
	add_child(m)
